package com.itheima.tilas.po;

import com.itheima.tilas.entity.Expr;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 132
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsertEmpOneParam {

    /**
     * 插入用于主键回显 ->给工作履历关联
     */
    private int id;
    @NotNull(message = "用户名不能为空")
    @Length(min = 2, max =20,message = "用户名长度为[2,20]")
    private String username;
    @NotNull(message = "姓名不能为空")
    @Length(min = 2, max =20,message = "姓名长度为[2,20]")
    private String name;
    @Length(min = 11,message = "手机号长度必须是11位")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号格式错误")
    private String phone;
    private Integer gender;
    @Range(min = 1,max = 6,message = "工作范围必须在[1,5]")
    private Integer job;
    private String image;
    private LocalDate entryDate;
    private Integer salary;
    private Integer deptId;
    private List<Expr> exprList;
    private LocalDateTime createTime;
    private LocalDateTime updatedTime;
}
